<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ page import="com.fckbug.vos.Acc"%>
<%
Acc acc = (Acc)request.getAttribute("acc");
String sessionId = request.getSession().getId();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人信息</title>
 <link rel="stylesheet" type="text/css" href="/css/all.css?v=1">
 <style>
 .asktitle{font-weight:bold;margin-right:12px;}
 </style>
<script type="text/javascript" src="/js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="/js/swfupload/handlers.js"></script>
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
<script>
var swfu;
window.onload = function () {
	swfu = new SWFUpload({
		// Backend Settings
		upload_url: "/user/upphoto.do;jsessionid=<%=sessionId%>",
		post_params: {"id": "<%=acc.getId() %>"},
		file_post_name: "myfile",

		// File Upload Settings
		file_size_limit : "100 KB",	// 
		file_types : "*.jpg",
		file_types_description : "JPG Images",
		file_upload_limit : 0,
		file_queue_limit : 1,

		// Event Handler Settings - these functions as defined in Handlers.js
		//  The handlers are not part of SWFUpload but are part of my website and control how
		//  my website reacts to the SWFUpload events.
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_progress_handler : myUploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : myUploadSuccess,
		upload_complete_handler : myUploadComplete,

		// Button Settings
		button_image_url : "",
		button_placeholder_id : "spanButtonPlaceholder",
		button_width: 180,
		button_height: 18,
		button_text : '<span class="cuti">修改头像</span>',
		button_text_style : '.cuti{font-weight:bold;color:#0000ff;}',
		button_text_top_padding: 0,
		button_text_left_padding: 48,
		button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
		button_cursor: SWFUpload.CURSOR.HAND,
		button_action:SWFUpload.BUTTON_ACTION.SELECT_FILE,
		
		// Flash Settings
		flash_url : "/js/swfupload/swfupload.swf",

		custom_settings : {
			//upload_target : "divFileProgressContainer"
		},
		prevent_swf_caching:false,
		// Debug Settings
		debug: false
	});
};

</script>
</head>
<body>
<div id="custom-header"></div>
<div class="container">
<jsp:include page="/header.jsp"></jsp:include>
<div id="content">
	<div id="mainbar-full" class="user-show-new">
		<div class="subheader">
			<h1 id="user-displayname"><a href="/user/profile.do?id=<%=acc.getId() %>"><%=acc.getNickName() %></a> &gt; 编辑</h1>
		</div>
		<table id="user-edit-table" width="100%">
        <tbody><tr>
            <td style="vertical-align: top; text-align: center; padding: 20px; width:128px;">
                <div id="" class="gravatar-wrapper-128"><img id="thumbnails" src="/head/<%=acc.getId() %>" alt="" class="main-image"></div>
                <p id="piccontainer" style="display:none;"></p>
                <form id="" name="myForm" action="/user/upphoto.do" method="post" enctype="multipart/form-data">
                <p style="font-weight:bold;margin-top:10px;">
                       <span id="spanButtonPlaceholder"></span>
                    </p></form>
                <!-- <div id="divFileProgressContainer" style="height: 75px;"></div> -->
            </td>
            <td style="vertical-align: top">
                <h2>注册用户详细资料</h2>
                <form id="user-edit-form" action="/user/modifyprofile.do" method="post">
                <input type="hidden" name="id" value="<%=acc.getId() %>">
                <div style="position: relative;"> 
                <table style="width:100%">
                    <tbody><tr>
                        <td>昵称</td>
                        <td><input type="text" name="nickname" id="display-name" value="<%=acc.getNickName() %>" maxlength="30" style="width: 260px; opacity: 1;" tabindex="1"></td>
                    </tr>
                    <tr>
                        <td>Email</td>
                        <td>
                            <input type="text" name="email" id="email" value="<%=acc.getEmail() %>" maxlength="30" style="width: 260px; opacity: 1;" tabindex="2">
                        </td>
                    </tr>
                    <tr>
                        <td>真实姓名</td>
                        <td><input type="text" name="realname" id="" value="<%=acc.getRealName() %>" maxlength="10" style="width: 260px; opacity: 1;" tabindex="3"></td>
                    </tr>
                    <tr>
                        <td>所属公司</td>
                        <td><input type="text" name="company" id="" value="<%=acc.getCompany() %>" maxlength="20" style="width: 260px; opacity: 1;" tabindex="4"></td>
                    </tr>
                    <tr>
                        <td>所在地</td>
                        <td><input type="text" name="location" id="" value="<%=acc.getLocation() %>" maxlength="20" style="width: 260px; opacity: 1;" tabindex="5">
                        </td>
                    </tr>
                    <tr>
                        <td>生日</td>
                        <td>
                            <input type="text" name="birthday" id="" value="<%=acc.getBirthday() %>" maxlength="8" style="width: 260px; opacity: 1;" tabindex="6">
                        </td>
                    </tr>
                    
                    <tr>
                        <td>                                
                        </td>
                        <td class="space">
                            <div class="form-error"></div>
                            <div class="form-submit">
                                <input id="push" name="push" type="hidden" value="false">
                                <input id="submit-button" type="submit" value="保存资料" tabindex="12" style="opacity: 1;">
                            </div>
                        </td>
                    </tr>
                </tbody></table>

                <input type="hidden" name="newsletter-form" value="on">
                <div class="module newuser newsletter-signup" style="position: absolute; top: 0; right: 15px; width: 235px; padding: 10px;">
                    <h4>Weekly Email Newsletter</h4>
                    <p>Sign up for a weekly email with:</p>
                    <ul>
                        <li>Top questions and answers</li>
                        <li>Important announcements</li>
                        <li>Unanswered questions</li>
                    </ul>
                    <br class="cbt">
                </div>

                </div>
                </form>
            </td>
        </tr>
    </tbody></table>
	</div>
</div>
</div>
</body>
</html>